#ifndef THREADPROCESS_H
#define THREADPROCESS_H

#include <QThread>
class Processes;

class ThreadProcess : public QThread
{
    Q_OBJECT
public:
    explicit ThreadProcess(QObject *parent = 0);
    ~ThreadProcess();
    void run();

signals:

    void sigErrorInfo(QString errorStr);
    void sigProcessStarted(QByteArray processName);
    void sigProcessError(QByteArray processName,QByteArray strError);
    void sigProcessFinished(QByteArray processName,int exitCode,QByteArray strStatus);
    void sigProcessStateChanged(QByteArray processName,QByteArray strState);

    void sigProcessShow(QByteArray processName); //显示进程的界面。如果进程不在运行，则启动进程
    void sigProcessHide(QByteArray processName);   //隐藏进程的界面

public slots:
    void slotTestProcessStarted(QByteArray processName);

private:
    QList <Processes*> listProcesses;

};

#endif // THREADPROCESS_H
